<html>
<head><meta charset="utf-8"><title>LLVM feature/version check for asm · project-inline-asm · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/index.html">project-inline-asm</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html">LLVM feature/version check for asm</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="197809362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809362">(May 16 2020 at 18:55)</a>:</h4>
<p>As mentioned on the GitHub PR for the implementation: Debian's Rust is built with system LLVM, Firefox is built with Rust, and Firefox uses "RUSTC_BOOTSTRAP". More generally, I think it'd be unfortunate if rustc built against system LLVM simply didn't support <code>asm!</code>, when nightly built against its own LLVM does. But it'd also be unfortunate if rustc built against system LLVM silently broke inline <code>asm!</code>.</p>



<a name="197809411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809411">(May 16 2020 at 18:56)</a>:</h4>
<p><span class="user-mention" data-user-id="143274">@Amanieu</span> Long-term, I agree with your comment in the thread, that you can just detect LLVM 11 (assuming all the patches make it into LLVM 11).</p>



<a name="197809426"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809426" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809426">(May 16 2020 at 18:56)</a>:</h4>
<p>But in the meantime, I expect that your patches will make their way into distribution versions of LLVM 10.</p>



<a name="197809427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809427">(May 16 2020 at 18:56)</a>:</h4>
<p>(with some nudging)</p>



<a name="197809439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809439">(May 16 2020 at 18:57)</a>:</h4>
<p>You said that LLVM 10 will have <em>all</em> the patches needed for <code>asm!</code>, except for one needed for handling SSE registers?</p>



<a name="197809485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809485">(May 16 2020 at 18:58)</a>:</h4>
<p>(I expect that many people using <code>asm!</code> for systems programming won't care as much, but people using it to write vectorized code for performance will care.)</p>



<a name="197809488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809488">(May 16 2020 at 18:58)</a>:</h4>
<p>Yes.</p>



<a name="197809494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809494">(May 16 2020 at 18:58)</a>:</h4>
<p>Could you provide a link to that patch so I can take a look at it?</p>



<a name="197809518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809518">(May 16 2020 at 18:58)</a>:</h4>
<p>(Also, has it been merged for LLVM 11?)</p>



<a name="197809526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809526">(May 16 2020 at 18:59)</a>:</h4>
<p>It's really only 2 patches: <a href="https://github.com/rust-lang/llvm-project/pull/52">https://github.com/rust-lang/llvm-project/pull/52</a></p>



<a name="197809528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809528">(May 16 2020 at 18:59)</a>:</h4>
<p>(yes)</p>



<a name="197809538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809538">(May 16 2020 at 18:59)</a>:</h4>
<p>1st one allows <code>${0:x}</code> style modifiers to be used with intel syntax.</p>



<a name="197809587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809587">(May 16 2020 at 19:00)</a>:</h4>
<p>2nd one adds support for the <code>x</code>, <code>t</code>, <code>g</code> modifiers from gcc. These print a register as <code>xmm</code>, <code>ymm</code> or <code>zmm</code> respectively.</p>



<a name="197809591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809591">(May 16 2020 at 19:00)</a>:</h4>
<p>/me looks at what the system LLVM handling in rust-lang/rust looks like.</p>



<a name="197809603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809603">(May 16 2020 at 19:00)</a>:</h4>
<p>Looking at the comments in that LLVM PR: would it theoretically be possible for an LLVM point release to add a patch that adds the modifiers but not the ABI-breaking bits?</p>



<a name="197809609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809609">(May 16 2020 at 19:01)</a>:</h4>
<p>You said that'd be enough for inline asm.</p>



<a name="197809618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809618">(May 16 2020 at 19:01)</a>:</h4>
<p>The ABI-breaking bits are from the 1st patch, which is already in LLVM 10</p>



<a name="197809622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809622">(May 16 2020 at 19:01)</a>:</h4>
<p>Oh!</p>



<a name="197809630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809630">(May 16 2020 at 19:01)</a>:</h4>
<p>Missed that detail. So the changes you need on top of LLVM 10 are ABI-compatible?</p>



<a name="197809631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809631">(May 16 2020 at 19:01)</a>:</h4>
<p>And we really only needed a subset of that patch.</p>



<a name="197809634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809634">(May 16 2020 at 19:01)</a>:</h4>
<p>They're just, effectively, bugfixes?</p>



<a name="197809635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809635">(May 16 2020 at 19:01)</a>:</h4>
<p>Yes.</p>



<a name="197809686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809686">(May 16 2020 at 19:02)</a>:</h4>
<p>Then what are the chances we can get them into LLVM 10.0.1 at this point?</p>



<a name="197809693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809693">(May 16 2020 at 19:02)</a>:</h4>
<p>Honestly if it becomes an issue for firefox I expect debian to just backport that patch.</p>



<a name="197809701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809701">(May 16 2020 at 19:03)</a>:</h4>
<p>Well, yes, but the issue is whether we can detect that.</p>



<a name="197809714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809714">(May 16 2020 at 19:03)</a>:</h4>
<p>If we can get the patches into LLVM 10.0.1, and then have a version check that makes sure system LLVM is at least 10.0.1, that would make things much easier on people.</p>



<a name="197809789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809789">(May 16 2020 at 19:05)</a>:</h4>
<p>Also this is likely to be an issue: <a href="https://bugs.llvm.org/show_bug.cgi?id=45291">https://bugs.llvm.org/show_bug.cgi?id=45291</a></p>



<a name="197809840"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809840" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809840">(May 16 2020 at 19:06)</a>:</h4>
<p>Ow. Yes, that seems likely to come up. Yikes.</p>



<a name="197809872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809872">(May 16 2020 at 19:07)</a>:</h4>
<p>I'm not especially familiar with LLVM development. Is it common that a bugfix with patch like that would sit in the bug tracker for two months with no response? Is there somewhere else it should be posted to get attention?</p>



<a name="197809993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197809993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197809993">(May 16 2020 at 19:09)</a>:</h4>
<p>In any case, what do you think are the chances that you could poke upstream LLVM and get the patches you need into 10.0.1 before -rc1 gets cut?</p>



<a name="197810489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197810489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197810489">(May 16 2020 at 19:18)</a>:</h4>
<p>At the moment, I'm wondering what our primary use case is for supporting excessively old versions of system LLVM, and whether we could get away with just hard-requiring 10.0.1 (or whatever has the patches). But if we can't do that, then it doesn't look <em>too</em> hard to just detect the version and if not found then disable <code>asm!</code>, or perhaps disable <code>asm!</code> support for SSE register in/out.</p>



<a name="197810496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197810496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197810496">(May 16 2020 at 19:18)</a>:</h4>
<p>From what I can tell, it's easy enough in <code>src/librustc_llvm/build.rs</code> to detect the LLVM version and set a feature flag for rustc.</p>



<a name="197810580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197810580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197810580">(May 16 2020 at 19:20)</a>:</h4>
<p>I don't want to disable all the asm tests on CI though (which uses system LLVM).</p>



<a name="197810587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197810587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197810587">(May 16 2020 at 19:20)</a>:</h4>
<p>At the moment it can run all of the tests that don't reach codegen (i.e. syntax &amp; type checking of <code>asm!</code>).</p>



<a name="197810684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197810684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197810684">(May 16 2020 at 19:23)</a>:</h4>
<p>Once the new LLVM is released, couldn't we use that released version in CI?</p>



<a name="197811003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811003">(May 16 2020 at 19:31)</a>:</h4>
<p>CI uses the system LLVM from ubuntu 18.04, which is ancient</p>



<a name="197811046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811046">(May 16 2020 at 19:32)</a>:</h4>
<p>LLVM 6 it seems</p>



<a name="197811048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811048">(May 16 2020 at 19:32)</a>:</h4>
<p>Gah.</p>



<a name="197811050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811050">(May 16 2020 at 19:32)</a>:</h4>
<p>I wonder if we could fix that.</p>



<a name="197811057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811057">(May 16 2020 at 19:32)</a>:</h4>
<p>That would then make sure we're running all the tests that require newer system LLVM.</p>



<a name="197811067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811067">(May 16 2020 at 19:33)</a>:</h4>
<p><span class="user-mention" data-user-id="121055">@Pietro Albini</span>, do you happen to know what it would take to run CI with a newer system LLVM? (Or, do you know the right person to ask about that?)</p>



<a name="197811068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811068">(May 16 2020 at 19:33)</a>:</h4>
<p>That's only for pull request CI though. bors builds Rust's LLVM and uses that.</p>



<a name="197811115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811115">(May 16 2020 at 19:34)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> hmm, I'm not 100% sure</p>



<a name="197811124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811124">(May 16 2020 at 19:34)</a>:</h4>
<p>one of the reasons we use system llvm there is that we don't have to rebuild it every time</p>



<a name="197811130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811130">(May 16 2020 at 19:35)</a>:</h4>
<p>which would increase PR build times a ton, as we can't upload caches from PR builders for security reasons (PR builders don't have the keys required)</p>



<a name="197811188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811188">(May 16 2020 at 19:36)</a>:</h4>
<p>Sure, it makes sense that they'd use system LLVM for that reason.</p>



<a name="197811193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811193">(May 16 2020 at 19:36)</a>:</h4>
<p>I'm wondering what it would take to update the image that they use, to something newer.</p>



<a name="197811199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811199">(May 16 2020 at 19:37)</a>:</h4>
<p>just a change in the dockerfile and making sure it still works</p>



<a name="197811214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811214">(May 16 2020 at 19:37)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> do you recall any reason not to bump the llvm in PR builders to the latest one available in ubuntu?</p>



<a name="197811257"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811257" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811257">(May 16 2020 at 19:38)</a>:</h4>
<p>Ubuntu 20.04 LTS has LLVM 10.</p>



<a name="197811428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811428">(May 16 2020 at 19:42)</a>:</h4>
<p>(One reason I can think of to not bump the version would be to test in CI that we still build with older LLVM. On the other hand, I'm wondering where our requirement for "minimum supported system LLVM version" comes from, and what the process would be to bump <em>that</em> forward. But that's a separate question, and not one that would have to be resolved to make this work.)</p>



<a name="197811783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811783">(May 16 2020 at 19:51)</a>:</h4>
<p>Yes, we use that to test compatibility with older LLVM</p>



<a name="197811836"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811836" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811836">(May 16 2020 at 19:52)</a>:</h4>
<p>We just a month or so ago bumped to the current one - 8 I think - usually that's initiated by <span class="user-mention" data-user-id="138448">@cuviper</span>. I'm not sure we have a strict policy. I would be uncomfortable bumping to latest though</p>



<a name="197811941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811941">(May 16 2020 at 19:55)</a>:</h4>
<p>Well, in that case, we'd need to detect <code>10.0.1</code> (or whatever version will support inline assembly properly) and set a feature flag (one which we also set with our own LLVM). We then have to figure out how much we can still do if we don't have that feature flag.</p>



<a name="197811944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811944">(May 16 2020 at 19:55)</a>:</h4>
<p>Do we expect to need the testing in PR CI? Otherwise just testing with normal bors builders seems fine to me - if the story is that you need to wait for llvm 11 for inline asm (or llvm 10 + patches?) imo that seems fine</p>



<a name="197811989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197811989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197811989">(May 16 2020 at 19:56)</a>:</h4>
<p>If people aren't using rustup to install their toolchain and need assembly it's on them to get an appropriate llvm configured I think</p>



<a name="197812014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197812014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197812014">(May 16 2020 at 19:57)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm/near/197811989">said</a>:</p>
<blockquote>
<p>If people aren't using rustup to install their toolchain and need assembly it's on them to get an appropriate llvm configured I think</p>
</blockquote>
<p>I agree with this, but I don't want anyone experiencing subtle breakage. I'd want people to get an explicit error.</p>



<a name="197812034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197812034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197812034">(May 16 2020 at 19:57)</a>:</h4>
<p>Definitely! I imagine we don't necessarily need version detection to do that though, or at least not exclusively</p>



<a name="197812078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197812078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197812078">(May 16 2020 at 19:58)</a>:</h4>
<p>I'd be fine with a config.toml "yes my llvm is good enough" flag</p>



<a name="197812096"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197812096" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197812096">(May 16 2020 at 19:58)</a>:</h4>
<p>Oh, that's a good idea. So, we could start with version detection, but we could also have a flag for "override the version detection, we've patched our system LLVM so asm works even though the version doesn't suggest it will"?</p>



<a name="197812099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197812099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197812099">(May 16 2020 at 19:58)</a>:</h4>
<p>And we can or that with llvm version &gt;= 11 or whatever is needed and eventually drop it once it becomes less necessary</p>



<a name="197812114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197812114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197812114">(May 16 2020 at 19:59)</a>:</h4>
<p>Yep</p>



<a name="197812123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197812123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197812123">(May 16 2020 at 19:59)</a>:</h4>
<p>Realistically I don't expect people to care that much</p>



<a name="197812197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197812197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197812197">(May 16 2020 at 20:00)</a>:</h4>
<p>That seems reasonable to me. And if an LLVM point release comes out with all the patches we need, we can change the version requirement from LLVM 11 to that point release.</p>



<a name="197812206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197812206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197812206">(May 16 2020 at 20:00)</a>:</h4>
<p>(Though we still need the patch from <a href="https://bugs.llvm.org/show_bug.cgi?id=45291">https://bugs.llvm.org/show_bug.cgi?id=45291</a> to get merged into LLVM 11.)</p>



<a name="197812207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197812207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197812207">(May 16 2020 at 20:00)</a>:</h4>
<p>Sure, exact version doesn't matter to me</p>



<a name="197812210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197812210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197812210">(May 16 2020 at 20:00)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="197812220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197812220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197812220">(May 16 2020 at 20:01)</a>:</h4>
<p>For now, before that version of system LLVM is released, we could even just <em>only</em> have the "my system LLVM is good enough" flag.</p>



<a name="197812230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197812230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197812230">(May 16 2020 at 20:01)</a>:</h4>
<p>And then we can add version detection to automatically set that once a version of LLVM comes out with all the patches we need.</p>



<a name="197812307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197812307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197812307">(May 16 2020 at 20:02)</a>:</h4>
<p><span class="user-mention" data-user-id="143274">@Amanieu</span> Does that sound reasonable as a starting point, for now, to help reduce the likelihood that someone will use their system LLVM and run into bugs?</p>



<a name="197812315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197812315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197812315">(May 16 2020 at 20:02)</a>:</h4>
<p>If so, I can write a comment summarizing that on the GItHub PR thread.</p>



<a name="197812895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197812895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197812895">(May 16 2020 at 20:14)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/69171#issuecomment-629700314">https://github.com/rust-lang/rust/pull/69171#issuecomment-629700314</a></p>



<a name="197813860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197813860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197813860">(May 16 2020 at 20:35)</a>:</h4>
<p>My feeling is that anyone using nightly Rust should be using Rust's LLVM.</p>



<a name="197813877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197813877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197813877">(May 16 2020 at 20:35)</a>:</h4>
<p>And that we should defer the issue of LLVM version until stabilization.</p>



<a name="197813927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197813927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197813927">(May 16 2020 at 20:36)</a>:</h4>
<p>I think any bugs that people will encounter will be sufficiently obvious.</p>



<a name="197813963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197813963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197813963">(May 16 2020 at 20:37)</a>:</h4>
<p>The SSE register thing might be (though people running into it might use it as an argument that the new <code>asm!</code> isn't insulating from LLVM bugs the way it was promised to).</p>



<a name="197813972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197813972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197813972">(May 16 2020 at 20:37)</a>:</h4>
<p>The "forgets intel dialect" bug, though, seems really obscure.</p>



<a name="197814037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197814037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197814037">(May 16 2020 at 20:38)</a>:</h4>
<p>Also, again, some people use nightly features on stable, which normally I'd write off as problematic except that Firefox does it.</p>



<a name="197814065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197814065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197814065">(May 16 2020 at 20:39)</a>:</h4>
<p>Could we leave this for a follow-up PR though?</p>



<a name="197814066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197814066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197814066">(May 16 2020 at 20:39)</a>:</h4>
<p>What is the downside of introducing a check here?</p>



<a name="197814076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197814076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197814076">(May 16 2020 at 20:39)</a>:</h4>
<p>Depends. Would the follow-up PR happen before the next beta gets branched?</p>



<a name="197814152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197814152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197814152">(May 16 2020 at 20:40)</a>:</h4>
<p>(Also, would implementation help make it more reasonable here?)</p>



<a name="197814168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197814168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197814168">(May 16 2020 at 20:40)</a>:</h4>
<p>I expect the discussion on that to be much shorter.</p>



<a name="197814177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197814177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197814177">(May 16 2020 at 20:40)</a>:</h4>
<p>I'd expect it to be unobjectionable, yeah.</p>



<a name="197814220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197814220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197814220">(May 16 2020 at 20:41)</a>:</h4>
<p>I do understand wanting to get this PR done rather than making it interminable. :)</p>



<a name="197814230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197814230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197814230">(May 16 2020 at 20:41)</a>:</h4>
<p>I'm happy to be the reviewer for the follow-up.</p>



<a name="197814247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197814247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197814247">(May 16 2020 at 20:42)</a>:</h4>
<p>Can you note it in the tracking issue (with link to that comment), assuming you're willing to go with that plan?</p>



<a name="197814303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197814303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197814303">(May 16 2020 at 20:42)</a>:</h4>
<p>Sure.</p>



<a name="197814304"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197814304" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197814304">(May 16 2020 at 20:42)</a>:</h4>
<p>Links to the relevant LLVM patches would help as well, in the new tracking bullet point.</p>



<a name="197814305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/LLVM%20feature/version%20check%20for%20asm/near/197814305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/LLVM.20feature.2Fversion.20check.20for.20asm.html#197814305">(May 16 2020 at 20:42)</a>:</h4>
<p>Thanks!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>